﻿using Microsoft.AspNetCore.Http;
using Models.Common;
using Newtonsoft.Json;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using UtilsORM;
using UtilsORM.MySqlData;

////using System.Web.Script.Serialization;

namespace GatewayServerService.Data
{
    public class DBIotDeviceCommand
    {



        public List<iot_device_command> getCommandList(string guid)
        {
            EFYihongIotContext ef = new EFYihongIotContext();
            return ef.iot_device_command.Where(c => c.dc_model_guid == guid && c.dc_status == 0).ToList();
        }
        public iot_device_command getCommand(string guid)
        {
            EFYihongIotContext ef = new EFYihongIotContext();
            return ef.iot_device_command.Where(c => c.dc_guid == guid).FirstOrDefault();
        }

    }
}
